#[derive(Debug)]
struct Dog {
    name: String,
    weight: f32,
    height: f32,
}

impl Dog {
    fn get_name(&self) -> &str {
        return &(self.name[..]);
    }

    fn get_weight(&self) -> f32 {
        return self.weight;
    }

    fn get_height(&self) -> f32 {
        return self.height;
    }

    fn show(&self) {
        println!("oh oh oh");
    }
}

fn main() {
    let littleWhite = Dog {
        name: String::from("小白"),
        weight: 50.0,
        height: 20.0,
    };

    println!("小白={:?}", littleWhite);
    println!("名称={}", littleWhite.get_name());
    println!("体重={}", littleWhite.get_weight());
    println!("高度={}", littleWhite.get_height());
    littleWhite.show();
}